package models

// ParamLogin 登录参数
type ParamLogin struct {
	PhoneOrEmail string `json:"phone_or_email" binding:"required"`
	Password     string `json:"password" binding:"required"`
}

// ParamSignUp 注册参数
type ParamSignUp struct {
	Phone           string `json:"phone"   binding:"required,len=11" validate:"required,numeric"`
	Nickname        string `json:"nickname"  binding:"required,min=5,max=16"`
	Gender          string `json:"gender" binding:"required"`
	Password        string `json:"password"  binding:"required,min=5,max=20"`
	ConfirmPassword string `json:"confirm_password"   binding:"required,eqfield=Password"`
	Captcha         string `json:"captcha"  validate:"required"` // 验证码
	IdKey           string `json:"id_key"   validate:"required"` // UUID
}

// ParamTasksByConditional 按条件查询任务的参数
type ParamTasksByConditional struct {
	TaskName      string `json:"task_name"`
	PublisherName string `json:"publisher_name" comment:"nickname"`
	TaskType      string `json:"task_type"`
	PublishTime   string `json:"publish_time"`
	EndTime       string `json:"end_time"`
	TaskStatus    string `json:"task_status"`
}

// ParamTaskInfo 查询任务详情的参数
type ParamTaskInfo struct {
	Id int `json:"id,string"`
}

// ParamReceiveTask 申领任务的参数
type ParamReceiveTask struct {
	Id int `json:"id,string"`
	//Uid int64 `json:"uid"`
}

// ParamSubmitVoucherTask 提交凭证完成任务的参数
type ParamSubmitVoucherTask struct {
	Id int `json:"id,string"`
	//CompletionImage string `json:"completion_image"`
}

//type ParamUserInfo struct { //无用
//	Uid      int64  `json:"uid"   gorm:"column:nickname"`     // ID
//	Nickname string `json:"nickname"  gorm:"column:nickname"` // 昵称
//	Avatar   string `json:"avatar"   gorm:"column:avatar"`    // 头像
//	Email    string `json:"email"     gorm:"column:email"`    // 邮箱
//	Gender   string `json:"gender"  gorm:"column:gender"`     //性别
//	Bio      string `json:"bio"   gorm:"column:bio"`          //个人简介
//	Campus   string `json:"campus"   gorm:"column:campus"`    //校区选择
//}
//
//func (m *ParamUserInfo) TableName() string {
//	return "users"
//}
